#!/bin/sh

CLASSDIR=classes

rm -Rf $CLASSDIR everything.jar
mkdir -p $CLASSDIR

javac -sourcepath src1:src2:src3 -d classes src3/ca/uoit/csci2020u/executables/TestAll.java

# JAR files are zip files.  Java makes use of these files with extra metadata in them.
#  cf - Create, file.  Without the 'f' it would output the resulting JAR to standard output.
#  -C - Tells 'jar' where the 'class' files are.
# Read the command as follows:
#  "Create a JAR named 'everything.jar' with classes from '$CLASSDIR' and place it in '.' (current directory)".
jar cf everything.jar -C $CLASSDIR/ .
